import request from '@/utils/request'

/**
 * 统计报表服务
 * @type {{orderStatistics: (function(): *), productStatistics: (function(): *), commentStatistics: (function(): *), userStatistics: (function(): *)}}
 */
export const ReportService = {
  // 订单统计概览
  orderStatistics: function() { return request({ method: 'get', url: '/manage/report/order/statistics.do' }) },
  // 订单分时统计
  orderReport: function(start, end) { return request({ method: 'get', url: '/manage/report/order/increase.do', params: { start: start, end: end }}) },
  // 产品统计概览
  productStatistics: function() { return request({ method: 'get', url: '/manage/report/product/statistics.do' }) },
  // 会员统计概览
  userStatistics: function() { return request({ method: 'get', url: '/manage/report/user/statistics.do' }) },
  // 用户分时统计
  userReport: function(start, end) { return request({ method: 'get', url: '/manage/report/user/increase.do', params: { start: start, end: end }}) },
  // 评论统计概览
  commentStatistics: function() { return request({ method: 'get', url: '/manage/report/comment/statistics.do' }) }
}
